import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);//输入字符串
        String str = in.nextLine();
        String[] ret = str.split(" ");//字符串以空格分隔存入数组
        System.out.println(ret[ret.length-1].length());//输出数组中最后一个元素的长度
    }
}
